package com.open.launcher.utils;


import com.open.launcher.callback.ChannelAllCallback;
import com.open.launcher.callback.ContentCallback;
import com.open.launcher.callback.ContentInterface;
import com.open.launcher.callback.IRequestCallback;
import com.open.launcher.callback.RequestCallback;
import com.open.launcher.helper.AllChannelsHelper;
import com.open.launcher.helper.HomePageHelper;
import com.open.launcher.helper.HotItemHelper;
import com.open.launcher.helper.LatelyHelper;
import com.open.launcher.helper.LiveListHelper;
import com.open.launcher.helper.NoticHelper;
import com.open.launcher.helper.PalayDetailHelper;
import com.open.launcher.helper.SitcomOrderHelper;
import com.open.launcher.helper.TestRecycleHelper;
import com.open.launcher.helper.VodItemHelper;
import com.open.launcher.presenter.ChannelDetailHelper;

/**
 * Created by wendal on 2017/9/11.
 */

public class AHservice implements ContentInterface, ChannelAllCallback {

    @Override
    public void loadTestRecycleItem(String url, ContentCallback callback) {
        TestRecycleHelper testRecycleHelper = new TestRecycleHelper();
        testRecycleHelper.setCallback(callback);
        testRecycleHelper.loadData(url);
    }

    @Override
    public void channelAllCallback(String url, RequestCallback callback) {
        AllChannelsHelper allChannelsHelper = new AllChannelsHelper();
        allChannelsHelper.setCallback(callback);
        allChannelsHelper.loadData(url);
    }

    @Override
    public void playDetailItemCallback(String url, RequestCallback callback) {
        HotItemHelper hotItemHelper = new HotItemHelper();
        hotItemHelper.setCallback(callback);
        hotItemHelper.loadData(url);
        //palayDetailHelper.setCallback(callback);
        //palayDetailHelper.loadData(url);
    }

    @Override
    public void sitcomOderCallback(String url, IRequestCallback callback) {
        SitcomOrderHelper sitcomHelper = new SitcomOrderHelper();
        sitcomHelper.setCallback(callback);
        sitcomHelper.loadData(url);
    }

    @Override
    public void latelyCallback(String url, RequestCallback callback) {
        LatelyHelper latelyHelper = new LatelyHelper();
        latelyHelper.setCallback(callback);
        latelyHelper.loadData(url);
    }

    @Override
    public void searchCallback(String url, RequestCallback callback) {
//        SearchHelper searchHelper = new SearchHelper();
//        searchHelper.setCallback(callback);
//        searchHelper.loadData(url);
    }

    @Override
    public void channelDetailCallback(String url, RequestCallback callback) {
        ChannelDetailHelper channelDetailHelper = new ChannelDetailHelper();
        channelDetailHelper.setCallback(callback);
        channelDetailHelper.loadData(url);
    }

    @Override
    public void filmDetailCallback(String url, RequestCallback callback) {
        PalayDetailHelper palayDetailHelper = new PalayDetailHelper();
        palayDetailHelper.setCallback(callback);
        palayDetailHelper.loadDetailsData(url);
    }

    @Override
    public void loadLiveListCallback(String url, IRequestCallback callback) {
        LiveListHelper liveListHelper = new LiveListHelper();
        liveListHelper.setCallback(callback);
        liveListHelper.loadLiveListData(url);
    }


    @Override
    public void loadVodListData(String url, IRequestCallback callback) {
//        VodListHelper vodListHelper = new VodListHelper();
//        vodListHelper.setCallback(callback);
//        vodListHelper.loadData(url);
    }

    @Override
    public void loadVodItemData(String url, IRequestCallback callback) {
        VodItemHelper vodItemHelper = new VodItemHelper();
        vodItemHelper.setCallback(callback);
        vodItemHelper.loadData(url);
    }

    @Override
    public void loadRecommendData(String url, ContentCallback callback) {
        //RecommendHelper recommendHelper = new RecommendHelper();
        //recommendHelper.setCallback(callback);
        //recommendHelper.loadData(url);
    }

    @Override
    public void loadHomePagedData(String url, IRequestCallback callback) {
        HomePageHelper homePageHelper = new HomePageHelper();
        homePageHelper.setCallback(callback);
        homePageHelper.loadData(url);
    }

    @Override
    public void loadNoticData(String url, IRequestCallback callback) {
        NoticHelper noticHelper = new NoticHelper();
        noticHelper.setCallback(callback);
        noticHelper.loadData("");
    }

}
